package helloworld;

import java.io.BufferedReader;
import java.io.FileReader;

import org.omg.CORBA.*;
import org.omg.CORBA.Object;

import helloApp.HelloItf;
import helloApp.HelloItfHelper;

public class HelloClient
{
  static HelloItf href;

  public static void main(String args[])
    {
      try{
        ORB orb = ORB.init(args, null);
        
        BufferedReader br = new BufferedReader(new FileReader("FicPourIOR"));
        String ior = br.readLine();
        br.close();
        Object obj = orb.string_to_object(ior);
        href = HelloItfHelper.narrow(obj);
        
        System.out.println("Nous somme le " + href.sayDate());
        System.out.println(href.concat("Hello", "mpg"));

        } catch (Exception e) {
          System.out.println("ERROR : " + e) ;
          e.printStackTrace(System.out);
          }
    }

}

